let array = [1,2,3,4,5,6,7,8]

//分页变量
let page = 3
let size = 3

//计算分页变量和数组之间关联
//第一页：0，3 第二页：3 6
const begin = (page-1)*size
const end = begin + size

let temp = array.slice(begin,end)
console.log(temp);